package lesson15;


public class ConstructorsExample {
	public static void main(String[] args) {
		//Person p1 = new Person();
		//printPerson(p1);
		//Person p2 = new Person("gosho", "8524011792", true);
		//printPerson(p2);
		Car myCar = new Car("black", true, "black", 1500, 230);
		System.out.println("blac, sport car");
		System.out.println(myCar.calculateCarPriceForScrap(1000));
		myCar.color = "blue";
		System.out.println("blue, sport car");
		System.out.println(myCar.calculateCarPriceForScrap(1000));
		myCar.isSportsCar=false;
		System.out.println("blue, NOT sport car");
		System.out.println(myCar.calculateCarPriceForScrap(1000));
		myCar.color="black";
		System.out.println("blac, NOT sport car");
		System.out.println(myCar.calculateCarPriceForScrap(1000));
		
	}
	
	public static void printPerson(Person person){
		System.out.println("=========== Person info ===========");
		System.out.println("name " +person.name);
		System.out.println("age "+person.age);
		System.out.println("Personal number "+person.personalNumber);
		System.out.println("Sex "+person.sex);
		System.out.println("Weight "+person.weight);
	}
}
